package com.woniu.service.Impl.homePage;

import com.woniu.dao.homePage.ImageDao;
import com.woniu.service.homePage.IImageService;
import com.woniu.util.ResData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 凌雨
 * @data 2023/3/11 16:42
 */
@Service
public class ImageServiceImpl implements IImageService {

    @Autowired
    private ImageDao imageDao;

    /**
     * 根据商品id查询所属的图片
     * @param goodsId
     * @return
     */
    @Override
    public ResData<?> queryImageByGoodsId(Integer goodsId) {
        return new ResData<>().ok(imageDao.queryImageByGoodsId(goodsId));
    }

}
